package com.fengwk.cv4j.test;

import com.fengwk.cv4j.factory.num.NumViewFactory;
import com.fengwk.cv4j.view.View;

public class Num {

	public static void main(String[] args) {
		NumViewFactory f = new NumViewFactory();
		
		View<Number> varx = f.of(1);// x
		
		View<Number> var0 = f.of(0);// 0
		View<Number> var1 = f.of(1);// 1
		
		View<Number> cv = f.div(var1, f.add(var1, f.exp(f.sub(var0, varx))));
		System.out.println(cv.compute());
		System.out.println(cv.gradient(varx).compute());
	}
	
}
